package com.maxus.mini.entity.moodessay;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.maxus.mini.common.ElumClass.Watch9CellStatus;
import com.maxus.mini.common.VersionedAuditableIdEntity;
import com.maxus.mini.entity.user.User;

/**
 * 心情短文
 * 
 * @author wujinsong
 *
 */
@Entity
@Table(name = "ex_mood_essay")
public class MoodEssay extends VersionedAuditableIdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2289942401582743917L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Override
	public Long getId() {
		return id;
	}

	/**
	 * 创建人
	 */
	private User user;

	/**
	 * 状态
	 */
	private String status = Watch9CellStatus.初始.name();

	/**
	 * 是否模板
	 */
	private boolean isTemplate = false;

	@ManyToOne()
	@JoinColumn(name = "uid")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public boolean isTemplate() {
		return isTemplate;
	}

	public void setTemplate(boolean isTemplate) {
		this.isTemplate = isTemplate;
	}
}
